<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <title>已租用算力包详情</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #f6f6f6;
            font-size: 0.26rem;
            padding-top: 0.5rem;
            height: auto;
            padding-bottom: 0.26rem;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: PingFang SC;
            color: #333333;
            padding-bottom: 0.8rem;
        }

        .testFix {
            width: 100%;
            height: 1rem;
            position: fixed;
            top: 0;
            left: 0;
            background: url("../../image/sajljl.jpg") no-repeat center;
            background-size: 100% 100%;
            z-index: 100;
        }

        .head {
            width: 100%;
            height: 47px;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            padding: 0 0.26rem;
        }

        .head img {
            width: 0.21rem;
            height: 0.36rem;
        }

        .head_title {
            font-size: 0.32rem;
            color: #333333;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        .showimg {
            width: 100%;
            height: 4.22rem;
        }

        .showimg img {
            width: 100%;
            height: 4.22rem;
        }

        .showItemheader {
            width: 100%;
            height: 4.1rem;
            background: url("../../image/newjljdf.png") no-repeat center;
            background-size: cover;
            margin-top: 0.3rem;
            padding: 0 0.3rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: space-between;
            box-sizing: border-box;
        }

        .showItemheader>p {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            padding-top: 0.39rem;
            box-sizing: border-box;
        }

        .showItemheader>p>span {
            font-size: 0.32rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: rgba(38, 38, 38, 1);
            margin-left: 0.15rem;
        }

        .showItemheader>div {
            width: 100%;
            height: auto;
            background: rgba(254, 255, 255, 1);
            box-shadow: 0px 0.14rem 0.35rem 0px rgba(224, 224, 224, 0.1);
            border-radius: 0.06rem;
            margin-top: 0.3rem;
            padding-bottom: 0.2rem;
            box-sizing: border-box;
        }

        .showItemheader>div ul {
            width: 100%;
            height: 100%;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
        }

        .showItemheader>div ul li {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 0 0.3rem;
            box-sizing: border-box;
        }

        .showItemheader>div ul li:first-of-type {
            justify-content: flex-start;
            margin-top: 0.34rem;
            margin-bottom: 0.12rem;
        }

        /* .bandDays {
            width: 1.57rem;
            height: .44rem;
            background: rgba(251, 246, 218, 1);
            opacity: 0.76;
            border-radius: 0.04rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(199, 148, 76, 1);
            line-height: 0.44rem;
            text-align: center;
        } */

        .showItemheader>div ul li:first-of-type span {
            font-size: 0.3rem;
            color: #262626;
        }

        .showItemheader>div ul li:first-of-type .samllText {
            font-size: 0.18rem;
            padding-top: 0.16rem;
            box-sizing: border-box;
            margin-left: 0.1rem;
        }

        .showItemheader>div ul li:last-of-type p,
        .showItemheader>div ul li:nth-of-type(3) p {
            width: 50%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(48, 20, 5, 1);
        }

        .firstitem {
            box-sizing: border-box;
            padding-right: 10%;
        }

        .showItemheader>div ul li:last-of-type p span:last-of-type {
            margin-left: 0.1rem;
            color: #181818;
        }

        .showAboutMachine {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            box-sizing: border-box;
            padding: 0 0.3rem;
        }

        .showtextdetail {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            background-color: #fff;
            box-shadow: 0 0.14rem 0.35rem 0 rgba(224, 224, 224, 0.1);
            border-radius: 0.1rem;
            margin-top: 0.2rem;
            box-sizing: border-box;
            padding-top: 0.28rem;
        }

        .showtextdetail p {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            background-color: #fff;
            padding: 0 0.28rem;
            box-sizing: border-box;
            font-size: 0.26rem;
            color: #262626;
            margin-bottom: 0.15rem;
            font-weight: 500;
        }

        .showtextdetail p:last-of-type {
            margin-bottom: .28rem;
        }

        .showtextdetail p span:first-of-type {
            color: #999999;
        }

        .showbasePower {
            width: 100%;
            height: 0.6rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            background-color: #fff;
            padding: 0 0.26rem;
            box-sizing: border-box;
            margin-top: 0.2rem;
            border-radius: 6px;
            font-weight: 500;
        }

        .showbasePower span:first-of-type {
            color: #999999;
        }

        .machineDetail {
            width: 100%;
            height: auto;
            margin-top: 0.2rem;
            border-radius: 6px;
        }

        .machineDetail ul {
            width: 100%;
            height: auto;
            padding: 0 0.26rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            background-color: #fff;
            box-sizing: border-box;
        }

        .machineDetail ul li {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            margin-top: 0.43rem;
            box-sizing: border-box;
        }

        .machineDetail ul li:first-of-type {
            margin-top: 0.3rem;
        }

        .machineDetail ul li:last-of-type {
            margin-bottom: 0.43rem;
        }

        .machineDetail ul li b {
            display: block;
            width: 100%;
            height: 0.4rem;
            font-size: 0.3rem;
            position: relative;
            margin-bottom: 0.3rem;
        }

        .machineDetail ul li p {
            font-size: 0.26rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(89, 89, 89, 1);
            line-height: 0.48rem;
        }

        .machineDetail ul li b>span {
            position: absolute;
            width: 1.3rem;
            height: 100%;
            left: 0;
            top: 0;
            z-index: 1;
            text-align: center;
        }

        .machineDetail ul li b>i {
            font-size: 0.3rem;
            position: absolute;
            width: 1.3rem;
            height: 0.1rem;
            content: " ";
            left: 0;
            bottom: 0;
            background-color: #FFD203;
            opacity: 0.5;
            z-index: 0;
        }

        .showButton {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin-top: 0.35rem;
        }

        .showButton button {
            width: 6.88rem;
            height: 0.8rem;
            outline: none;
            border: none;
            background: rgba(255, 217, 64, 1);
            border-radius: 0.1rem;
            text-align: center;
            line-height: 0.8rem;
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
            margin-bottom: 0.25rem;
        }

        .showSevice {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            padding: 0 0.3rem;
            box-sizing: border-box;
            background-color: #ffffff;
            margin-top: 0.2rem;
            border-radius: 0.1rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
        }

        .showSevice p {
            width: 100%;
            height: 0.9rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
        }

        .showSevice p:last-of-type {
            border-top: 1px solid #EEEEEE;
        }

        .showSevice p:first-of-type span:first-of-type {
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: rgba(38, 38, 38, 1);
        }

        .back {
            background-color: #f1f1f1;
            border-radius: 0 0 0 0.1rem;
        }

        .fenQiDeatail {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            padding: 0 0.3rem;
            box-sizing: border-box;
            background-color: #ffffff;
            margin-top: 0.2rem;
            border-radius: 0.1rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
            padding-bottom: 0.2rem;
        }

        .fenQiDeatail .fenQiDeatailtitle {
            width: 100%;
            height: 0.9rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #EEEEEE;
        }

        .fenQiDeatail .fenQiDeatailtitle span:first-of-type {
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: rgba(38, 38, 38, 1);
        }

        .fenQiMoney {
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(250, 76, 76, 1);
        }

        .byStagesDays {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0.2rem;
        }

        .byStagesDays li {
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(153, 153, 153, 1);
        }

        .byStagesDays li:not(:last-of-type) span:last-of-type {
            color: rgba(38, 38, 38, 1);
        }

        .beOverdue {
            width: 100%;
            height: auto;
            margin-top: 0.2rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.26rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(137, 137, 137, 1);
        }

        .beOverdue img {
            width: 0.32rem;
            margin-right: 0.1rem;
        }

        .endTimeNum {
            width: 100%;
            height: auto;
            margin-top: 0.2rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.26rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(137, 137, 137, 1);
        }

        .endTimeNum img {
            width: 0.32rem;
            margin-right: 0.1rem;
        }

        .beOverdue span:first-of-type,
        .endTimeNum span:first-of-type {
            display: flex;
            display: -webkit-flex;
            align-items: center;
        }

        .showConouActiviy {
            height: auto;
            background: #FFF8ED;
            border-radius: 2px;
            font-size: 0.22rem;
            color: #DE9218;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 0.25rem;
        }
    </style>
</head>

<body>
    <div class="testFix">
        <div class="head" style="position: relative">
            <span id="goback"
                style="position: absolute;z-index: 1;left: 0;padding: 0 0.3rem; padding-right: 0.5rem;top: 0;height: 100%; box-sizing: border-box;line-height: 47px;">
                <img src="../../image/left_jiantouax.png" alt="" style="width: 10px;height: auto" />
            </span>
            <span class="head_title" style="display: block;width: 100%;text-align: center">
                合约包详情
            </span>
            <span style="display: inline-block;width: 0.21rem;height: 0.36rem;">
            </span>
        </div>
    </div>
    <div class="showItemheader">
        <p>
            <img src="../../image/iconbsasx.png" id="imgSrcchange"
                style="width: 0.67rem;height: 0.3rem;border-radius:0.08rem;">
            <span class="name_th">
            </span>
        </p>
        <div>
            <ul>
                <li>
                    <span class="deposit" style="font-size: 0.36rem;">0</span>
                    <span class="moneyType samllText">CNY</span>
                </li>
                <li style="justify-content: flex-start;margin-bottom: 0.3rem;">
                    <!-- <p style="height: 0.44rem; display:flex;align-items: center;margin-right: 0.2rem;background-color: #FCF5E2;color:#F19224;font-size: 0.22rem;padding: 0 0.15rem;border-radius: 0.04rem;display: none;" id="showRecoveryImg">
                         不可回购
                    </p> -->
                    <p class="daylimit"
                        style="padding:0.05rem 0.12rem;margin-left: 0.1rem;font-size: 0.22rem;background-color: #F7F7F7;color:#898989;display: none;">

                    </p>
                    <p style="display:flex;align-items: center;">
                        <span id="showVoucher"
                            style="display:inline-block;width:1.1rem;height:0.44rem;line-height: 0.44rem;background:#edfff2;color:#80d699;font-size:0.19rem;text-align: center;border-radius:0.05rem;margin-left: 0.3rem;display: none;">已司法存证</span>
                        <span id="showtime"
                            style="display:inline-block;padding: 0 0.1rem;height:0.44rem;line-height: 0.44rem;background:#ffe3e6;color:#ff6678;font-size:0.19rem;text-align: center;border-radius:0.05rem;box-sizing: border-box;display: none;">
                            即将到期
                        </span>
                    </p>
                    <p class="showFenqiIcon"
                        style="background:rgba(255,242,239,1);border-radius:0.04rem;color:rgba(194,56,43,1);padding:0.05rem 0.12rem;margin-left: 0.1rem;font-size: 0.22rem;display: none;">
                        分期购
                    </p>
                    <p class="showBuy"
                        style="background-color: #F7F7F7;color:#898989;border-radius:0.04rem;padding:0.05rem 0.12rem;margin-left: 0.1rem;font-size: 0.22rem;">
                        购买
                    </p>
                    <p class="showTrans"
                        style="background-color: rgba(66,170,121,0.1);color:#42AA79;border-radius:0.04rem;padding:0.05rem 0.12rem;margin-left: 0.1rem;font-size: 0.22rem;display: none;">
                        可转让
                    </p>
                </li>
                <li>
                    <p class="firstitem">
                        <span>
                            订单份额
                        </span>
                        <span class="disnum">
                            0T
                        </span>
                    </p>
                    <p>
                        <span>
                            BTC总算力
                        </span>
                        <span class="maxRentNum">
                            0T
                        </span>
                    </p>
                </li>
                <li style="margin-top:0.1rem;">
                    <p class="firstitem"
                        style="width: 50%;display: flex;display: -webkit-flex;justify-content: space-between;align-items: center;font-size: 0.24rem;font-family: PingFang SC;font-weight: 500;color: rgba(48, 20, 5, 1);"
                        id="tranferPower">
                        <span>
                            转让中份额
                        </span>
                        <span class="tranferPower">
                            0T
                        </span>
                    </p>
                    <p class="showBhpPowerNum"
                        style="flex: 1;display: flex;display: -webkit-flex;justify-content: space-between;font-size: 0.24rem;font-family: PingFang SC;font-weight: 500;color: rgba(48, 20, 5, 1);display: none;">
                        <span>
                            BHP参配算力
                        </span>
                        <span class="bhpPowerNum">
                            0T
                        </span>
                    </p>
                </li>
                <li style="margin-top:0.1rem;">
                    <p class="firstitem" id="stopRentPower">
                        <span>
                            已退单份额
                        </span>
                        <span class="stopRentPower">
                            0份
                        </span>
                    </p>
                    <p style="display: none;">
                        <span>
                            已退单份额
                        </span>
                        <span style="display: none;">
                            0份
                        </span>
                    </p>
                </li>
            </ul>
        </div>
    </div>
    <div class="showAboutMachine">
        <div class="showtextdetail">
            <p>
                <span>
                    订单号
                </span>
                <span class="orderNumber">
                    000000000
                </span>
            </p>
            <p class="showthisText">
                <span>
                    历史产出
                </span>
                <span style="display: flex;display: -webkit-flex;flex-direction: column;align-items: flex-end;">
                    <span class="historyPro" style="color: #262626;">
                        0.0000
                    </span>
                    <span class="historyProBhp" style="display: none;">
                        0.0000
                    </span>
                </span>
            </p>
            <p>
                <span>
                    分币比例
                </span>
                <span class="digtimeBhppower" style="color:#FA4C4C;">
                    0.00%
                </span>
            </p>
            <p>
                <span>
                    发币方式
                </span>
                <span class="digtime">
                    日结，次日发放至账户
                </span>
            </p>
            <p>
                <span>
                    开挖时间
                </span>
                <span class="BeginrunningDate">
                </span>
            </p>
            <p id="showEndTime" style="display: none;">
                <span class="changeName">
                    锁定时间
                </span>
                <span class="endDate">
                </span>
            </p>
            <p id="stopRentTime" style="display: none;">
                <span>
                    退单时间
                </span>
                <span class="stopRentTime">
                </span>
            </p>
            <p id="tranferTime" style="display: none;">
                <span>
                    续单时间
                </span>
                <span class="tranferTime">
                </span>
            </p>
            <p>
                <span>
                    算力来源
                </span>
                <span class="calculateSource">
                </span>
            </p>
        </div>
        <div class="showbasePower" style="border-radius: 0.1rem 0.1rem 0 0;">
            <span>
                单份到手BTC算力
            </span>
            <span>
                <span class="getUnitBtc" style="color: #262626;">

                </span>
            </span>
        </div>
        <div class="showbasePower" style="margin-top: 0;border-radius: 0;">
            <span>
                单份基础BTC算力
            </span>
            <span class="basepowerNum">
            </span>
        </div>
        <div class="showbasePower showMorePower" style="margin-top: 0;border-radius:0;">
            <span>
                单份奖励BTC算力
            </span>
            <span>
                <span class="rewardPower" style="color: #262626;">

                </span>
                <img src="../../image/right_jintou.png">
            </span>
        </div>
        <div class="showbasePower showBhpPowerNum"
            style="margin-top: 0;border-radius: 0 0 0.1rem 0.1rem;padding-bottom: 0.1rem;display: none;">
            <span>
                单份BHP参配算力
            </span>
            <span>
                <span class="baseBhpPower" style="color: #262626;">

                </span>
            </span>
        </div>
        <div class="showSevice" style="display: none;">
            <p class="goServicePage">
                <span>
                    服务合约
                </span>
                <span>
                    <span class="serviceStatus"
                        style="font-size:0.24rem;font-family:PingFang SC;font-weight:500;color:rgba(89,89,89,0.65);">
                    </span>
                    <img src="../../image/right_jintou.png" alt="">
                </span>
            </p>
            <p class="hideClassStatus" style="display: none;">
                <span class="serviceName">

                </span>
                <span class="endTimeSevice" style="color: #898989;">

                </span>
            </p>
        </div>
        <div class="showbasePower showConouActiviy" style="margin-top: 0.2rem;border-radius:0;display: none;">
            <b style="display: flex;display: -webkit-flex;align-items: center;margin-bottom: 0.1rem;">
                <img src="../../image/giftx.png" style="width:0.24rem;margin-right: 0.1rem;"> 【限时活动】预约续单有礼
            </b>
            <p class="showText">
            </p>
        </div>
        <div class="fenQiDeatail" style="display: none;">
            <p class="fenQiDeatailtitle">
                <span>
                    分期总金额
                </span>
                <span class="fenQiMoney">
                    -- CNY
                </span>
            </p>
            <ul class="byStagesDays" style="display: none;">
                <li>
                    <span>
                        期数
                    </span>
                    <span class="fenqiDays">
                        --期
                    </span>
                </li>
                <li>
                    <span>
                        服务费
                    </span>
                    <span class="fenqiServiceFree">
                        --CNY
                    </span>
                </li>
                <li>
                    <span style="visibility: hidden;">
                        --
                    </span>
                    <span class="fenQiPlan" style="text-decoration:underline;font-size: 0.22rem;">
                        查看还款账单
                    </span>
                </li>
            </ul>
            <p class="beOverdue" style="display: none;">
                <span>
                    <img src="../../image/iconyuqix.png" alt=""> 逾期已清算
                </span>
                <span class="fenQiPlan" style="text-decoration:underline;font-size: 0.22rem;">
                    查看还款账单
                </span>
            </p>
            <p class="endTimeNum" style="display: none;">
                <span>
                    <img src="../../image/donsdsx.png" alt=""> 已结清
                </span>
                <span class="fenQiPlan" style="text-decoration:underline;font-size: 0.22rem;">
                    查看还款账单
                </span>
            </p>
        </div>
    </div>
    <div class="showButton" id="buttonBox" style="display: none;">
        <button id="relet">
            续单
        </button>
        <button id="sellandbuy" style="display: none;">
            转让
        </button>
        <button id="stopRentNew" style="background-color:#ffd203;color: #383838;display: none;">
            退单
        </button>
    </div>
    <script src="../../script/autosize.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/app.js"></script>
    <script>
        apiready = function () {
            var app = new APP();
            // app.headerMap();
            var account = app.getAccount();
            var cointype = api.pageParam.cointype;
            var machineId = api.pageParam.id;
            var pagename = api.pageParam.name;//页面名称
            var ischeckVoucher = api.pageParam.ischeckVoucher; //是否显示司法存证
            var orderId = api.pageParam.orderId; //订单ID
            var textColor = api.pageParam.textColor; //文字颜色
            var machineState = api.pageParam.machineState; //机器状态
            var thisMatchine; //机器信息
            var order_id = "";
            var rentUnit = "CNY"; //租用机器支付的方式
            var refour = /([0-9]+\.[0-9]{4})[0-9]*/;
            app.ajaxPro({
                url: "order/get",
                values: {
                    token: account.token,
                    orderId: orderId
                },
                openFlower: true
            }, function (ret) {
                if (ret.code == 200) {
                    thisMatchine = ret.data;
                    // console.log('thisMatchine++++++'+JSON.stringify(thisMatchine))
                    order_id = thisMatchine.order_id;
                    var limitRentUnit = "T";
                    if (thisMatchine.currencyCode != "BTC") {
                        limitRentUnit = "M";
                    }
                    $(".showBuy").show(thisMatchine.state2 == 2 ? "承接" : "购买");
                    if (thisMatchine.label == 1) {
                        $(".showTrans").show();
                    }
                    if (thisMatchine.renewal_coupon_desc) {
                        var textNums = "";
                        for (var k = 0; k < thisMatchine.renewal_coupon_desc.length; k++) {
                            textNums += thisMatchine.renewal_coupon_desc[k] + "<br>"
                        }
                        $(".showText").html(textNums);
                    }
                    if (thisMatchine.is_per_renewal == 1) {
                        $(".showConouActiviy").show();
                    } else {
                        $(".showConouActiviy").hide();
                    }
                    if (thisMatchine.dragStatus != 1 && thisMatchine.dragStatus != 0) {
                        $("#stopRentTime").show();
                        $(".stopRentTime").text(thisMatchine.updateTime);
                    }
                    if (thisMatchine.renewalTime) {
                        $(".tranferTime").text(thisMatchine.renewalTime);
                        $("#tranferTime").show()
                    }
                    if (thisMatchine.freezeNum != 0) {
                        $(".tranferPower").text(thisMatchine.freezeNum + "份");
                    }
                    if (thisMatchine.state == 0 && Number(app.numSub(thisMatchine.rawNum, thisMatchine.num)) != 0) {
                        $("#stopRentPower,.stopRentPower").show();
                        $(".stopRentPower").text(app.numSub(thisMatchine.rawNum, thisMatchine.num) + "份");
                    }
                    if (thisMatchine.state == 2 || thisMatchine.state == 1) {
                        $("#stopRentPower,.stopRentPower").show();
                        $(".stopRentPower").text(thisMatchine.rawNum + "份");
                    }
                    if (thisMatchine.regularDateNum) {
                        if (thisMatchine.type == 10) {
                            $(".changeName").text("到期时间");
                        }
                        $("#showEndTime").show();
                        $(".endDate").text(thisMatchine.endTime);
                    }
                    $(".digtimeBhppower").text(app.accMul(thisMatchine.distributionRate, 100) + "%");
                    if (thisMatchine.coupon) {
                        $(".moneyNum").text(thisMatchine.coupon.CNY.dis);
                    }
                    if (thisMatchine.isBhpPos == 1) {
                        $(".bhpcshow").show();
                        // $(".historyProBhp").show();
                        $(".baseBhpPower").text(thisMatchine.bhpPower + "T");
                        $(".showBhpPowerNum").show().css("display", "flex");
                        $(".bhpPowerNum").text(app.accMul(thisMatchine.bhpPower, thisMatchine.num) + limitRentUnit);
                    } else {
                        $("#imgSrcchange").css({
                            "width": "0.3rem",
                            "height": "0.3rem"
                        })
                        if (thisMatchine.currencyCode == "BTC") {
                            $("#imgSrcchange").attr("src", "../../image/iconasxx.png");
                        } else if (thisMatchine.currencyCode == "ETH") {
                            $("#imgSrcchange").attr("src", "../../image/iconcethx.png");
                        } else {
                            $("#imgSrcchange").attr("src", "../../image/icondltcx.png");
                        }
                        // $(".showthisText").css("marginTop", "0.28rem");
                    }
                    //显示分期购
                    if (thisMatchine.paymentType && thisMatchine.paymentType == 2) {
                        $(".fenQiDeatail").show();
                        var thisflag = thisMatchine.flag.substring(1, 2);
                        if (thisflag == 1) {
                            $(".showFenqiIcon").show()
                        }
                        //分期总金额
                        $(".fenQiMoney").text(app.numSub(thisMatchine.rawTotalDeposit, thisMatchine.downPayment) + "CNY");
                        if (thisMatchine.fqState == 0) {
                            //进行中
                            $(".byStagesDays").show();
                            $(".fenqiDays").text(thisMatchine.installmentNum + "期");
                            $(".fenqiServiceFree").text(thisMatchine.installmentFee + "CNY");
                        } else if (thisMatchine.fqState == 2) {
                            //逾期
                            $(".beOverdue").show();
                        } else {
                            //已付款
                            $(".endTimeNum").show();
                        }
                    }
                    if (thisMatchine.returnEndDate) {
                        thisMatchine.returnEndDate = thisMatchine.returnEndDate + " 00:00:00";
                        //指定时间的时间戳(s)
                        var operTime = app.toSecond(thisMatchine.returnEndDate);
                        //返回当前时间的时间戳(s)
                        var nowThisTime = app.getCurStamp();
                        var isShowEnd = operTime - nowThisTime;
                        if (isShowEnd < Number(app.accMul(86400, thisMatchine.end_days))) {
                            $("#showtime").show();
                        }
                        if (nowThisTime > operTime) {
                            $("#showtime").hide();
                        }
                    } else {
                        if (nowThisTime > operTime) {
                            $("#showtime").hide();
                        }
                    }
                    if (thisMatchine.insuranceOrderId != 0) {
                        $(".showSevice").show();
                        $(".goServicePage").click(function () {
                            app.openWin({
                                name: "service_detail",
                                url: app.hd + "mine/service_detail.html",
                                pageParam: {
                                    subpage: "mine/service_detail",
                                    name: "service_detail",
                                    title: "保险合约包详情",
                                    id: thisMatchine.insurance_info.id
                                }
                            })
                        });
                        $(".hideClassStatus").show();
                        $(".serviceName").text(thisMatchine.insurance_info.name);
                        $(".endTimeSevice").text(thisMatchine.insurance_info.start_time.replace(/-/g, "/").split(' ')[0] + "-" + thisMatchine.insurance_info.settle_time.replace(/-/g, "/").split(' ')[0]);
                    };

                    if (thisMatchine.type != 11 && thisMatchine.type != 10 || thisMatchine.paymentCurrencyCode != "BHPC" || thisMatchine.notReturn != 1) {
                        if (thisMatchine.label == 1) {
                            $("#sellandbuy").show();
                        }
                    }
                    if (thisMatchine.is_return_label == 1) {
                        $("#stopRentNew").show();
                    }
                    // console.log("==========thistime" + new Date().getTime() + "*****" + app.toSecond(thisMatchine.endTime))
                    $("#stopRentNew").click(function () {
                        var machineEndTime = app.toSecond(thisMatchine.endTime) * 1000;
                        var thistime = new Date().getTime();
                        if (thistime < machineEndTime) {
                            var param = {
                                dtype: "dialog1",
                                data: {
                                    text: "矿机合约锁定期限最低30天，未达期限的不能退单！",
                                    btns: [{
                                        name: "确定",
                                        event: ""
                                    }]
                                }
                            };
                            app.dialog(param);
                            return
                        }
                        if (thisMatchine.is_one_year == 1) {
                            var param = {
                                dtype: "dialog1",
                                data: {
                                    text: "本合约开挖期限已超过<span style='color:#ffd203'>365天</span>,请到OTC市场转让",
                                    btns: [{
                                        name: "取消",
                                        event: ""
                                    }, {
                                        name: "去转让",
                                        event: "goTranferMach"
                                    }]
                                }
                            };
                            app.dialog(param);
                            return
                        }
                        var params = {
                            subpage: "rent/stoprent",
                            name: "stoprent",
                            title: "退单",
                            param: {
                                pageName: "stoprent",
                                renewal: ret.renewal_info,
                                coinCurrentValue: ret.total_deposit_coin_current_value,
                                machineData: ret.data,
                                bhpcisshow: thisMatchine.paymentCurrencyCode,
                                textTips: ret.loss
                            }
                        };
                        app.setNavBarAttr(params);
                    })
                    $(".showMorePower").click(function () {
                        var param = {
                            dtype: "dialog281",
                            data: {
                                floatpower: thisMatchine.floatPower + limitRentUnit,
                                pepower: thisMatchine.pePower + limitRentUnit,
                                setdatepower: thisMatchine.regularPower + limitRentUnit,
                                hopepower: thisMatchine.futuresPower + limitRentUnit,
                                totalpower: addRewardPower + limitRentUnit
                            }
                        };
                        app.dialog(param);
                    });
                    if (thisMatchine.state == 0) {//矿机状态
                        $("#relet").show().click(function () {
                            var goCerfition = {
                                name: "renew",
                                subpage: "rent/renew",
                                title: "续单",
                                param: {
                                    pageName: "renew",
                                    renewal: ret.renewal_info,
                                    coinCurrentValue: ret.total_deposit_coin_current_value,
                                    machineData: ret.data,
                                    bhpcisshow: thisMatchine.paymentCurrencyCode,
                                    coinType: cointype,
                                    machineID: machineId
                                }
                            };
                            app.setNavBarAttr(goCerfition);
                        })
                    }
                    if (Number(thisMatchine.regularDateNum) <= 30) {
                        $("#relet").text("续单");
                        // $("#relet").attr("data-param", continueDataDay);
                    }
                    $("#sellandbuy").unbind('click').on("click", function (params) {
                        var thisArrTime = thisMatchine.endTime;
                        var thisYear = new Date().getFullYear();
                        var thisMonth = new Date().getMonth() + 1;
                        var thisDate = new Date().getDate();
                        var thisTimeYYR = thisYear + '-' + thisMonth + '-' + thisDate + " 00:00:00";
                        var machineCanReturn = Number(app.toSecond(thisArrTime)) > app.toSecond(thisTimeYYR) ? false : true;
                        if (machineCanReturn == false) {
                            var param2 = {
                                dtype: "dialog1",
                                data: {
                                    text: "矿机合约锁定期限最低30天，未达期限的不能转让！",
                                    btns: [{
                                        name: "确定",
                                        event: ""
                                    }]
                                }
                            };
                            app.dialog(param2);
                        } else {
                            // var goCerfition = {
                            //     name: "send_power",
                            //     subpage: "fisrt/send_power",
                            //     title: "转让",
                            //     rightTitle: "记录",
                            //     rightIconUrl: "/image/zhuanranx.png",
                            //     param: {
                            //         Matchine: thisMatchine,
                            //         machineId: orderId,
                            //         usdtPrice: thisMatchine.usdtPrice,
                            //         eventTrigger: "transferDialog"
                            //     }
                            // };
                            // app.setNavBarAttr(goCerfition);
                            var cointypecontract = {
                                page: "common/headerwin",
                                name: "send_power_headerwin",
                                param: {
                                    subpage: "fisrt/send_power",
                                    name: "send_power",
                                    title: "转让",
                                    Matchine: thisMatchine,
                                    machineId: orderId,
                                    usdtPrice: thisMatchine.usdtPrice,
                                    rightIcon: {
                                        icon: "../../image/zhuanrang.png"
                                    },
                                    eventTrigger: "transferDialog"
                                }
                            };
                            var recoinNumber = JSON.stringify(cointypecontract);
                            app.goPushPage(recoinNumber);
                        };
                    });
                    $(".historyPro").text((thisMatchine.btcIncomeNum == 0 ? "0.00000000" : thisMatchine.btcIncomeNum) + "个/" + cointype);
                    // $(".historyProBhp").text((thisMatchine.bhpIncomeNum == 0 ? "0.0000" : thisMatchine.bhpIncomeNum) + "个/BHP");
                    var showArriTime = false;
                    if (thisMatchine.auto_renewal_time && thisMatchine.auto_renewal_time > 60 && thisMatchine.freezeNum < 1) {
                        showArriTime = true;
                    }
                    if (thisMatchine.regularDateNum > 0 && showArriTime != true) {
                        $(".daylimit").show().text(thisMatchine.regularDateNum + "天");
                    }
                    $(".machine-type>span").eq(0).text(thisMatchine.isBhpPos == 1 ? cointype + "+" + "BHP" : cointype);
                    if (thisMatchine.paymentCurrencyCode == "BCNY") {
                        $(".showtype").text("1 OTC余额");
                    } else {
                        $(".showtype").text("1 CNY");
                    }
                    $(".deposit").text(thisMatchine.totalDeposit);
                    $(".orderNumber").text(thisMatchine.orderId);
                    if (thisMatchine.paymentCurrencyCode == "BCNY") {
                        $(".moneyType").text("OTC余额");
                    } else {
                        $(".moneyType").text(thisMatchine.paymentCurrencyCode)
                    }
                    $(".disnum").text(thisMatchine.num + "份");
                    $(".name_th").text(thisMatchine.productName);
                    $(".BeginrunningDate").text(thisMatchine.startTime);
                    $(".calculateSource").text(thisMatchine.powerNodeName);
                    $(".maxRent").text(Number(thisMatchine.computingPower) + limitRentUnit);
                    $(".maxRentNum").text(app.accMul(thisMatchine.computingPower, thisMatchine.num) + limitRentUnit);
                    $(".getUnitBtc").text(thisMatchine.computingPower + "T");
                    $(".rewardPower").text(app.numSub(thisMatchine.computingPower, thisMatchine.basePower) + "T");
                    var addRewardPower = app.moreAccAdd(
                        thisMatchine.futuresPower,
                        thisMatchine.regularPower,
                        thisMatchine.floatPower,
                        thisMatchine.pePower
                    )
                    $(".baseAllNum").text(addRewardPower + limitRentUnit);
                    $(".basepowerNum").text(Number(thisMatchine.basePower) + limitRentUnit);
                    if (thisMatchine.type == 10) {
                        $("#showRecoveryImg").show();
                    }
                    if (thisMatchine.is_new == 1) {
                        $(".showStopTime").show();
                    }
                    // || (app.accDiv(thisMatchine.productDeposit, thisMatchine.basePower) < 3000 && thisMatchine.paymentCurrencyCode == "CNY")
                    function today() {
                        var today = new Date();
                        var str = "";
                        str += today.getFullYear() + "-";
                        var month = today.getMonth() + 1;//返回值是 0（一月） 到 11（十二月） 之间的一个整数。
                        if (month < 10) {
                            str += "0";
                        }
                        str += month + "-";
                        var day = today.getDate();//返回值是 1 ~ 31 之间的一个整数
                        if (day < 10) {
                            str += "0";
                        }
                        str += day;
                        return str;
                    }
                    function diffNumdata(sDate1, sDate2) {
                        sDate1 = sDate1.split(' ')[0];
                        sDate2 = sDate2.split(' ')[0];
                        var aDate, oDate1, oDate2, iDays;
                        aDate = sDate1.split("-");
                        oDate1 = new Date(aDate[0], aDate[1], aDate[2]);
                        aDate = sDate2.split("-");
                        oDate2 = new Date(aDate[0], aDate[1], aDate[2]);
                        iDays = parseInt((oDate1 - oDate2) / 1000 / 60 / 60 / 24);
                        return iDays
                    }
                    var subNum = diffNumdata(today(), thisMatchine.endTime);
                    if ((thisMatchine.type == 4 && thisMatchine.productId == 0) || thisMatchine.paymentCurrencyCode == "BHPC" || thisMatchine.state != 0 || thisMatchine.depositCny < 100 || subNum < -15) {
                        $("#relet").hide();
                    }
                    if (thisMatchine.type == 10) {
                        $(".buttonBox").hide();
                    } else {
                        $("#buttonBox").show();
                    }
                }
                app.handlePage();
            })
            $("#goback").on("click", function () {
                app.closeW(pagename);
            });
            $(".fenQiPlan").on("click", function () {
                app.ajaxPro({
                    url: "hilink/get-plan",
                    values: {
                        token: account.token,
                        order_num: orderId
                    },
                    openFlower: true
                }, function (ret) {
                    if (ret.code == 200) {
                        app.openWin({
                            name: "suanlijinrong",
                            url: ret.data,
                            slidBackEnabled: false
                        })
                    } else {
                        app.toast(ret.message);
                    }
                })
            })
            var event = ["renew_success", "relet_success", "stop_rent_success"];
            app.listen(event, function () {
                app.reload();
            });
            app.listen("transferSe", function () {
                setTimeout(function () {
                    api.closeWin("computing_details_headerwin");
                }, 1000);
            })
        }
    </script>
</body>

</html>